package Work0519;

/**
 * 玩家类
 * 
 * @author Y
 *
 */
public class Player {
	private String name;
	private int levelNo = 1;// 玩家当前级别号
	private int currScore;// 玩家当前级别积分
	private long startTime = System.currentTimeMillis();// 当前级别开始时间
	private int elapsedTime;// 当前级别已用时间

	public Player(String name) {
		this.name = name;
	}

	public int getLevelNo() {
		return levelNo;
	}

	public void setLevelNo(int levelNo) {
		this.levelNo = levelNo;
	}

	public int getCurrScore() {
		return currScore;
	}

	public void setCurrScore(int currScore) {
		this.currScore = currScore;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;

	}

	public int getElapsedTime() {
		return elapsedTime;
	}

	public void setElapsedTime(int elapsedTime) {
		this.elapsedTime = elapsedTime;
	}

	public void play() {
		setLevelNo(levelNo + 1);// 当前级别难度加1
		System.out.println("难度等级改为" + getLevelNo());
		setCurrScore(0);// 将积分重置
	}
}
